home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / R / RequiredAE XCMD.sit / RequiredAE XCMD ƒ / source / hyperUtil.c < prev    next >
MacBinary  |  1991-08-11  |  9.4 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Aug 11 20:48:44 1991, modified Sun Aug 11 20:48:44 1991, creator Think C, type ASCII, 8895 bytes "hyperUtil.c" , at 0x233f 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 68 79 70 65 72 55 | 74 69 6c 2e 63 00 00 00 |..hyperU|til.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 22 bf 00 | 00 01 ac a4 cb 8b 6c a4 |....."..|......l.|
|00000060| cb 8b 6c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..l.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4c 9f 00 00 |........|....L...|
|00000080| 2f 2a 2a 2a 0d 20 2a 20 | 68 79 70 65 72 55 74 69 |/***. * |hyperUti|
|00000090| 6c 2e 63 0d 20 2a 0d 20 | 2a 20 20 53 6f 6d 65 20 |l.c. *. |* Some |
|000000a0| 75 73 65 66 75 6c 20 72 | 6f 75 74 69 6e 65 20 66 |useful r|outine f|
|000000b0| 6f 72 20 77 72 69 74 69 | 6e 67 20 68 79 70 65 72 |or writi|ng hyper|
|000000c0| 63 61 72 64 20 78 63 6d | 64 73 20 61 6e 64 20 66 |card xcm|ds and f|
|000000d0| 75 6e 63 73 2e 0d 20 2a | 0d 20 2a 20 20 47 6f 72 |uncs.. *|. * Gor|
|000000e0| 64 6f 6e 20 57 61 74 74 | 73 20 4a 75 6c 79 20 27 |don Watt|s July '|
|000000f0| 39 31 20 43 6f 70 79 72 | 69 67 68 74 2e 0d 20 2a |91 Copyr|ight.. *|
|00000100| 0d 20 2a 2a 2a 2f 0d 23 | 69 6e 63 6c 75 64 65 20 |. ***/.#|include |
|00000110| 3c 48 79 70 65 72 58 43 | 6d 64 2e 68 3e 0d 23 69 |<HyperXC|md.h>.#i|
|00000120| 6e 63 6c 75 64 65 20 22 | 68 79 70 65 72 55 74 69 |nclude "|hyperUti|
|00000130| 6c 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 3c 41 |l.h".#in|clude <A|
|00000140| 6c 69 61 73 65 73 2e 68 | 3e 0d 2f 2a 2a 0d 20 2a |liases.h|>./**. *|
|00000150| 20 73 74 72 54 6f 48 61 | 6e 64 6c 65 0d 20 2a 0d | strToHa|ndle. *.|
|00000160| 20 2a 20 20 43 6f 6e 76 | 65 72 74 20 61 20 6e 75 | * Conv|ert a nu|
|00000170| 6c 6c 20 74 65 72 6d 69 | 6e 61 74 65 64 20 73 74 |ll termi|nated st|
|00000180| 72 69 6e 67 20 74 6f 20 | 61 20 68 61 6e 64 6c 65 |ring to |a handle|
|00000190| 20 74 6f 20 70 61 73 73 | 20 62 61 63 6b 20 74 6f | to pass| back to|
|000001a0| 20 68 79 70 65 72 63 61 | 72 64 2e 0d 20 2a 0d 20 | hyperca|rd.. *. |
|000001b0| 2a 2a 2f 0d 48 61 6e 64 | 6c 65 20 73 74 72 54 6f |**/.Hand|le strTo|
|000001c0| 48 61 6e 64 6c 65 20 28 | 58 43 6d 64 50 74 72 20 |Handle (|XCmdPtr |
|000001d0| 74 68 65 50 2c 20 63 68 | 61 72 20 2a 74 68 65 53 |theP, ch|ar *theS|
|000001e0| 74 72 69 6e 67 29 0d 7b | 0d 09 48 61 6e 64 6c 65 |tring).{|..Handle|
|000001f0| 20 74 68 65 48 61 6e 64 | 6c 65 3b 0d 09 72 65 67 | theHand|le;..reg|
|00000200| 69 73 74 65 72 20 53 69 | 7a 65 20 74 68 65 4c 65 |ister Si|ze theLe|
|00000210| 6e 20 3d 20 53 74 72 69 | 6e 67 4c 65 6e 67 74 68 |n = Stri|ngLength|
|00000220| 20 28 74 68 65 50 2c 20 | 74 68 65 53 74 72 69 6e | (theP, |theStrin|
|00000230| 67 29 20 2b 20 31 3b 0d | 0d 09 74 68 65 48 61 6e |g) + 1;.|..theHan|
|00000240| 64 6c 65 20 3d 20 4e 65 | 77 48 61 6e 64 6c 65 20 |dle = Ne|wHandle |
|00000250| 28 74 68 65 4c 65 6e 29 | 3b 0d 09 42 6c 6f 63 6b |(theLen)|;..Block|
|00000260| 4d 6f 76 65 20 28 74 68 | 65 53 74 72 69 6e 67 2c |Move (th|eString,|
|00000270| 20 2a 74 68 65 48 61 6e | 64 6c 65 2c 20 74 68 65 | *theHan|dle, the|
|00000280| 4c 65 6e 29 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |Len);...|.return |
|00000290| 74 68 65 48 61 6e 64 6c | 65 3b 0d 7d 0d 2f 2a 2a |theHandl|e;.}./**|
|000002a0| 0d 20 2a 20 48 43 50 72 | 6f 67 72 61 6d 54 6f 50 |. * HCPr|ogramToP|
|000002b0| 6f 72 74 41 6e 64 4c 6f | 63 0d 20 2a 0d 20 2a 20 |ortAndLo|c. *. * |
|000002c0| 20 43 6f 6e 76 65 72 74 | 20 61 20 48 79 70 65 72 | Convert| a Hyper|
|000002d0| 63 61 72 64 20 70 72 6f | 67 72 61 6d 20 6e 61 6d |card pro|gram nam|
|000002e0| 65 20 28 3c 7a 6f 6e 65 | 3e 3a 3c 6d 61 63 3e 3a |e (<zone|>:<mac>:|
|000002f0| 3c 70 72 6f 67 72 61 6d | 3e 29 20 74 6f 20 61 0d |<program|>) to a.|
|00000300| 20 2a 20 20 70 6f 72 74 | 2e 20 20 49 66 20 74 68 | * port|. If th|
|00000310| 61 74 20 70 72 6f 67 72 | 61 6d 20 68 61 73 20 6d |at progr|am has m|
|00000320| 6f 72 65 20 74 68 61 6e | 20 6f 6e 65 20 70 6f 72 |ore than| one por|
|00000330| 74 20 6f 70 65 6e 2c 20 | 77 65 20 74 61 6b 65 20 |t open, |we take |
|00000340| 74 68 65 0d 20 2a 20 20 | 66 69 72 73 74 20 70 6f |the. * |first po|
|00000350| 72 74 20 77 65 20 66 69 | 6e 64 21 0d 20 2a 0d 20 |rt we fi|nd!. *. |
|00000360| 2a 20 20 41 73 73 75 6d | 70 74 69 6f 6e 73 20 77 |* Assum|ptions w|
|00000370| 65 20 6d 61 6b 65 3a 0d | 20 2a 0d 20 2a 2a 2f 0d |e make:.| *. **/.|
|00000380| 4f 53 45 72 72 20 48 43 | 50 72 6f 67 72 61 6d 54 |OSErr HC|ProgramT|
|00000390| 6f 50 6f 72 74 41 6e 64 | 4c 6f 63 20 28 63 68 61 |oPortAnd|Loc (cha|
|000003a0| 72 20 2a 74 68 65 4e 61 | 6d 65 2c 20 4c 6f 63 61 |r *theNa|me, Loca|
|000003b0| 74 69 6f 6e 4e 61 6d 65 | 52 65 63 20 2a 74 68 65 |tionName|Rec *the|
|000003c0| 4c 6f 63 2c 0d 09 50 6f | 72 74 49 6e 66 6f 52 65 |Loc,..Po|rtInfoRe|
|000003d0| 63 20 2a 74 68 65 50 6f | 72 74 29 0d 7b 0d 09 63 |c *thePo|rt).{..c|
|000003e0| 68 61 72 20 2a 61 70 70 | 6c 65 5a 6f 6e 65 20 3d |har *app|leZone =|
|000003f0| 20 30 3b 0d 09 63 68 61 | 72 20 2a 6d 61 63 4e 61 | 0;..cha|r *macNa|
|00000400| 6d 65 20 3d 20 30 3b 0d | 09 63 68 61 72 20 2a 70 |me = 0;.|.char *p|
|00000410| 72 6f 67 4e 61 6d 65 20 | 3d 20 30 3b 0d 09 63 68 |rogName |= 0;..ch|
|00000420| 61 72 20 2a 74 68 65 4c | 61 73 74 43 68 61 72 20 |ar *theL|astChar |
|00000430| 3d 20 30 3b 0d 09 50 50 | 43 50 6f 72 74 52 65 63 |= 0;..PP|CPortRec|
|00000440| 20 74 68 65 50 6f 72 74 | 53 65 61 72 63 68 53 70 | thePort|SearchSp|
|00000450| 65 63 3b 0d 09 49 50 43 | 4c 69 73 74 50 6f 72 74 |ec;..IPC|ListPort|
|00000460| 73 50 42 52 65 63 20 74 | 68 65 50 42 52 65 63 3b |sPBRec t|hePBRec;|
|00000470| 0d 09 69 6e 74 20 74 68 | 65 45 72 72 3b 0d 0d 09 |..int th|eErr;...|
|00000480| 2f 2a 2a 0d 09 20 2a 2a | 20 41 73 73 65 6d 62 6c |/**.. **| Assembl|
|00000490| 65 20 61 20 6c 6f 63 61 | 74 69 6f 6e 2e 20 20 54 |e a loca|tion. T|
|000004a0| 68 69 73 20 69 73 20 61 | 20 62 69 74 20 6f 66 20 |his is a| bit of |
|000004b0| 61 20 70 61 69 6e 2c 20 | 61 73 20 77 65 20 6d 75 |a pain, |as we mu|
|000004c0| 73 74 0d 09 20 2a 2a 20 | 63 61 72 65 66 75 6c 6c |st.. ** |carefull|
|000004d0| 79 20 75 6e 70 61 63 6b | 20 74 68 65 20 69 6e 63 |y unpack| the inc|
|000004e0| 6f 6d 6d 69 6e 67 20 73 | 74 72 69 6e 67 2e 2e 2e |omming s|tring...|
|000004f0| 0d 09 20 2a 2a 2f 0d 09 | 0d 09 2f 2a 2a 0d 09 20 |.. **/..|../**.. |
|00000500| 2a 2a 20 46 69 72 73 74 | 20 6a 6f 62 20 2d 2d 20 |** First| job -- |
|00000510| 66 69 6e 64 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |find the| end of |
|00000520| 74 68 65 20 69 6e 63 6f | 6d 6d 69 6e 67 20 73 74 |the inco|mming st|
|00000530| 72 69 6e 67 20 73 6f 20 | 77 65 20 64 6f 6e 27 74 |ring so |we don't|
|00000540| 0d 09 20 2a 2a 20 72 75 | 6e 20 6f 66 66 20 69 6e |.. ** ru|n off in|
|00000550| 74 6f 20 6d 65 6d 6f 72 | 79 2e 2e 2e 0d 09 20 2a |to memor|y..... *|
|00000560| 2a 2f 0d 09 0d 09 74 68 | 65 4c 61 73 74 43 68 61 |*/....th|eLastCha|
|00000570| 72 20 3d 20 74 68 65 4e | 61 6d 65 3b 0d 09 61 70 |r = theN|ame;..ap|
|00000580| 70 6c 65 5a 6f 6e 65 20 | 3d 20 74 68 65 4e 61 6d |pleZone |= theNam|
|00000590| 65 3b 09 09 09 2f 2a 20 | 46 69 72 73 74 20 74 68 |e;.../* |First th|
|000005a0| 69 6e 67 20 74 68 65 72 | 65 2e 2e 2e 20 2a 2f 0d |ing ther|e... */.|
|000005b0| 09 77 68 69 6c 65 20 28 | 2a 74 68 65 4c 61 73 74 |.while (|*theLast|
|000005c0| 43 68 61 72 20 21 3d 20 | 27 5c 30 27 29 20 7b 0d |Char != |'\0') {.|
|000005d0| 09 09 69 66 20 28 2a 74 | 68 65 4c 61 73 74 43 68 |..if (*t|heLastCh|
|000005e0| 61 72 20 3d 3d 20 27 3a | 27 29 20 7b 0d 09 09 09 |ar == ':|') {....|
|000005f0| 69 66 20 28 21 6d 61 63 | 4e 61 6d 65 29 20 7b 0d |if (!mac|Name) {.|
|00000600| 09 09 09 09 6d 61 63 4e | 61 6d 65 20 3d 20 74 68 |....macN|ame = th|
|00000610| 65 4c 61 73 74 43 68 61 | 72 20 2b 20 31 3b 0d 09 |eLastCha|r + 1;..|
|00000620| 09 09 7d 20 65 6c 73 65 | 20 69 66 20 28 21 70 72 |..} else| if (!pr|
|00000630| 6f 67 4e 61 6d 65 29 20 | 7b 0d 09 09 09 09 70 72 |ogName) |{.....pr|
|00000640| 6f 67 4e 61 6d 65 20 3d | 20 74 68 65 4c 61 73 74 |ogName =| theLast|
|00000650| 43 68 61 72 20 2b 20 31 | 3b 0d 09 09 09 7d 0d 09 |Char + 1|;....}..|
|00000660| 09 7d 0d 09 09 74 68 65 | 4c 61 73 74 43 68 61 72 |.}...the|LastChar|
|00000670| 2b 2b 3b 0d 09 7d 0d 09 | 0d 09 2f 2a 2a 0d 09 20 |++;..}..|../**.. |
|00000680| 2a 2a 20 52 69 67 68 74 | 2c 20 6d 61 6b 65 20 73 |** Right|, make s|
|00000690| 75 72 65 20 74 68 61 74 | 20 77 65 20 67 6f 74 20 |ure that| we got |
|000006a0| 65 76 65 72 79 74 68 69 | 6e 67 2e 2e 2e 0d 09 20 |everythi|ng..... |
|000006b0| 2a 2a 2f 0d 09 0d 09 69 | 66 20 28 28 70 72 6f 67 |**/....i|f ((prog|
|000006c0| 4e 61 6d 65 20 3d 3d 20 | 30 29 20 7c 7c 20 28 6d |Name == |0) || (m|
|000006d0| 61 63 4e 61 6d 65 20 3d | 3d 20 30 29 29 0d 09 09 |acName =|= 0))...|
|000006e0| 72 65 74 75 72 6e 20 31 | 3b 09 09 2f 2a 20 52 61 |return 1|;../* Ra|
|000006f0| 6e 64 6f 6d 20 65 72 72 | 6f 72 2e 2e 2e 20 2a 2f |ndom err|or... */|
|00000700| 0d 0d 09 2f 2a 2a 0d 09 | 20 2a 2a 20 4e 65 78 74 |.../**..| ** Next|
|00000710| 2c 20 61 73 73 65 6d 62 | 6c 65 20 61 20 70 6f 72 |, assemb|le a por|
|00000720| 74 20 72 65 63 6f 72 64 | 20 74 68 61 74 20 77 65 |t record| that we|
|00000730| 20 63 61 6e 20 75 73 65 | 20 74 6f 20 73 70 65 63 | can use| to spec|
|00000740| 69 66 79 20 77 68 61 74 | 0d 09 20 2a 2a 20 74 68 |ify what|.. ** th|
|00000750| 65 20 68 65 6c 6c 20 77 | 65 20 61 72 65 20 6c 6f |e hell w|e are lo|
|00000760| 6f 6b 69 6e 67 20 66 6f | 72 2e 2e 2e 20 20 55 73 |oking fo|r... Us|
|00000770| 65 20 61 20 72 6f 6d 61 | 6e 20 73 63 72 69 70 74 |e a roma|n script|
|00000780| 20 28 73 6f 72 72 79 2c | 20 67 75 79 73 29 2c 0d | (sorry,| guys),.|
|00000790| 09 20 2a 2a 20 6d 61 74 | 63 68 20 6f 6e 6c 79 20 |. ** mat|ch only |
|000007a0| 6e 61 6d 65 73 20 74 68 | 61 74 20 68 61 76 65 20 |names th|at have |
|000007b0| 6f 75 72 20 70 72 6f 67 | 72 61 6d 2c 20 61 6e 64 |our prog|ram, and|
|000007c0| 20 6d 61 74 63 68 20 61 | 6c 6c 20 74 79 70 65 73 | match a|ll types|
|000007d0| 2e 0d 09 20 2a 2a 20 54 | 68 61 74 20 77 61 79 20 |... ** T|hat way |
|000007e0| 77 65 20 77 69 6c 6c 20 | 67 65 74 20 74 68 65 20 |we will |get the |
|000007f0| 66 69 72 73 74 20 74 79 | 70 65 2e 0d 09 20 2a 2a |first ty|pe... **|
|00000800| 2f 0d 09 0d 09 74 68 65 | 50 6f 72 74 53 65 61 72 |/....the|PortSear|
|00000810| 63 68 53 70 65 63 2e 6e | 61 6d 65 53 63 72 69 70 |chSpec.n|ameScrip|
|00000820| 74 20 3d 20 73 6d 52 6f | 6d 61 6e 3b 0d 09 74 68 |t = smRo|man;..th|
|00000830| 65 50 6f 72 74 53 65 61 | 72 63 68 53 70 65 63 2e |ePortSea|rchSpec.|
|00000840| 70 6f 72 74 4b 69 6e 64 | 53 65 6c 65 63 74 6f 72 |portKind|Selector|
|00000850| 20 3d 20 70 70 63 42 79 | 53 74 72 69 6e 67 3b 0d | = ppcBy|String;.|
|00000860| 09 4d 61 6b 65 50 61 73 | 63 61 6c 53 74 72 69 6e |.MakePas|calStrin|
|00000870| 67 57 4c 65 6e 20 28 28 | 53 74 72 69 6e 67 50 74 |gWLen ((|StringPt|
|00000880| 72 29 20 74 68 65 50 6f | 72 74 53 65 61 72 63 68 |r) thePo|rtSearch|
|00000890| 53 70 65 63 2e 6e 61 6d | 65 2c 20 33 32 2c 20 70 |Spec.nam|e, 32, p|
|000008a0| 72 6f 67 4e 61 6d 65 2c | 0d 09 09 09 28 53 69 7a |rogName,|....(Siz|
|000008b0| 65 29 28 74 68 65 4c 61 | 73 74 43 68 61 72 20 2d |e)(theLa|stChar -|
|000008c0| 20 70 72 6f 67 4e 61 6d | 65 29 29 3b 0d 09 4d 61 | progNam|e));..Ma|
|000008d0| 6b 65 50 61 73 63 61 6c | 53 74 72 69 6e 67 57 4c |kePascal|StringWL|
|000008e0| 65 6e 20 28 28 53 74 72 | 69 6e 67 50 74 72 29 20 |en ((Str|ingPtr) |
|000008f0| 74 68 65 50 6f 72 74 53 | 65 61 72 63 68 53 70 65 |thePortS|earchSpe|
|00000900| 63 2e 75 2e 70 6f 72 74 | 54 79 70 65 53 74 72 2c |c.u.port|TypeStr,|
|00000910| 0d 09 09 09 33 32 2c 20 | 22 3d 22 2c 20 31 29 3b |....32, |"=", 1);|
|00000920| 0d 0d 09 2f 2a 2a 0d 09 | 20 2a 2a 20 4e 65 78 74 |.../**..| ** Next|
|00000930| 20 6a 6f 62 20 69 73 20 | 74 6f 20 66 69 6c 6c 20 | job is |to fill |
|00000940| 69 6e 20 74 68 65 20 6c | 6f 63 61 74 69 6f 6e 20 |in the l|ocation |
|00000950| 72 65 63 6f 72 64 20 74 | 68 61 74 20 74 68 65 20 |record t|hat the |
|00000960| 67 75 79 20 70 61 73 73 | 65 64 0d 09 20 2a 2a 20 |guy pass|ed.. ** |
|00000970| 69 6e 2e 20 20 54 68 65 | 20 6f 62 6a 53 74 72 69 |in. The| objStri|
|00000980| 6e 67 20 69 73 20 74 68 | 65 20 6d 61 63 20 77 65 |ng is th|e mac we|
|00000990| 20 77 69 73 68 20 74 6f | 20 63 6f 6e 6e 65 63 74 | wish to| connect|
|000009a0| 20 74 6f 2e 20 20 54 68 | 65 20 7a 6f 6e 65 0d 09 | to. Th|e zone..|
|000009b0| 20 2a 2a 20 69 73 20 74 | 68 65 20 61 70 70 6c 65 | ** is t|he apple|
|000009c0| 20 7a 6f 6e 65 2e 20 20 | 57 65 20 6c 65 74 20 74 | zone. |We let t|
|000009d0| 68 65 20 74 79 70 65 20 | 62 65 20 72 61 6e 64 6f |he type |be rando|
|000009e0| 6d 2e 2e 2e 20 20 73 6f | 20 77 65 20 73 65 74 20 |m... so| we set |
|000009f0| 69 74 0d 09 20 2a 2a 20 | 74 6f 20 50 50 43 54 6f |it.. ** |to PPCTo|
|00000a00| 6f 6c 42 6f 78 20 61 73 | 20 64 65 66 69 6e 65 64 |olBox as| defined|
|00000a10| 20 62 79 20 49 4d 20 56 | 49 20 36 20 37 2d 32 33 | by IM V|I 6 7-23|
|00000a20| 2e 0d 09 20 2a 2a 2f 0d | 09 0d 09 74 68 65 4c 6f |... **/.|...theLo|
|00000a30| 63 20 2d 3e 20 6c 6f 63 | 61 74 69 6f 6e 4b 69 6e |c -> loc|ationKin|
|00000a40| 64 53 65 6c 65 63 74 6f | 72 20 3d 20 70 70 63 4e |dSelecto|r = ppcN|
|00000a50| 42 50 4c 6f 63 61 74 69 | 6f 6e 3b 0d 09 7b 0d 09 |BPLocati|on;..{..|
|00000a60| 09 72 65 67 69 73 74 65 | 72 20 45 6e 74 69 74 79 |.registe|r Entity|
|00000a70| 4e 61 6d 65 20 2a 74 68 | 65 45 20 3d 20 26 28 74 |Name *th|eE = &(t|
|00000a80| 68 65 4c 6f 63 20 2d 3e | 20 75 2e 6e 62 70 45 6e |heLoc ->| u.nbpEn|
|00000a90| 74 69 74 79 29 3b 0d 09 | 09 0d 09 09 4d 61 6b 65 |tity);..|....Make|
|00000aa0| 50 61 73 63 61 6c 53 74 | 72 69 6e 67 57 4c 65 6e |PascalSt|ringWLen|
|00000ab0| 20 28 28 53 74 72 69 6e | 67 50 74 72 29 20 26 28 | ((Strin|gPtr) &(|
|00000ac0| 74 68 65 45 20 2d 3e 20 | 6f 62 6a 53 74 72 29 2c |theE -> |objStr),|
|00000ad0| 20 33 32 2c 0d 09 09 09 | 09 09 6d 61 63 4e 61 6d | 32,....|..macNam|
|00000ae0| 65 2c 20 28 69 6e 74 29 | 20 28 70 72 6f 67 4e 61 |e, (int)| (progNa|
|00000af0| 6d 65 20 2d 20 6d 61 63 | 4e 61 6d 65 20 2d 20 31 |me - mac|Name - 1|
|00000b00| 29 29 3b 0d 09 09 4d 61 | 6b 65 50 61 73 63 61 6c |));...Ma|kePascal|
|00000b10| 53 74 72 69 6e 67 57 4c | 65 6e 20 28 28 53 74 72 |StringWL|en ((Str|
|00000b20| 69 6e 67 50 74 72 29 20 | 26 28 74 68 65 45 20 2d |ingPtr) |&(theE -|
|00000b30| 3e 20 74 79 70 65 53 74 | 72 29 2c 20 33 32 2c 0d |> typeSt|r), 32,.|
|00000b40| 09 09 09 09 09 22 50 50 | 43 54 6f 6f 6c 42 6f 78 |....."PP|CToolBox|
|00000b50| 22 2c 20 31 30 29 3b 0d | 09 09 4d 61 6b 65 50 61 |", 10);.|..MakePa|
|00000b60| 73 63 61 6c 53 74 72 69 | 6e 67 57 4c 65 6e 20 28 |scalStri|ngWLen (|
|00000b70| 28 53 74 72 69 6e 67 50 | 74 72 29 20 26 28 74 68 |(StringP|tr) &(th|
|00000b80| 65 45 20 2d 3e 20 7a 6f | 6e 65 53 74 72 29 2c 20 |eE -> zo|neStr), |
|00000b90| 33 32 2c 0d 09 09 09 09 | 09 61 70 70 6c 65 5a 6f |32,.....|.appleZo|
|00000ba0| 6e 65 2c 20 28 6d 61 63 | 4e 61 6d 65 20 2d 20 61 |ne, (mac|Name - a|
|00000bb0| 70 70 6c 65 5a 6f 6e 65 | 20 2d 20 31 29 29 3b 0d |ppleZone| - 1));.|
|00000bc0| 09 7d 0d 0d 09 2f 2a 2a | 0d 09 20 2a 2a 20 52 69 |.}.../**|.. ** Ri|
|00000bd0| 67 68 74 2e 20 20 46 69 | 6e 61 6c 6c 79 2c 20 77 |ght. Fi|nally, w|
|00000be0| 65 20 66 69 6c 6c 20 69 | 6e 20 74 68 65 20 70 61 |e fill i|n the pa|
|00000bf0| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 20 77 65 |rameter |block we|
|00000c00| 20 61 72 65 20 74 6f 20 | 70 61 73 73 0d 09 20 2a | are to |pass.. *|
|00000c10| 2a 20 74 6f 20 49 50 43 | 4c 69 73 74 50 6f 72 74 |* to IPC|ListPort|
|00000c20| 73 2e 0d 09 20 2a 2a 2f | 0d 09 0d 09 74 68 65 50 |s... **/|....theP|
|00000c30| 42 52 65 63 2e 73 74 61 | 72 74 49 6e 64 65 78 20 |BRec.sta|rtIndex |
|00000c40| 3d 20 30 3b 0d 09 74 68 | 65 50 42 52 65 63 2e 72 |= 0;..th|ePBRec.r|
|00000c50| 65 71 75 65 73 74 43 6f | 75 6e 74 20 3d 20 31 3b |equestCo|unt = 1;|
|00000c60| 0d 09 74 68 65 50 42 52 | 65 63 2e 70 6f 72 74 4e |..thePBR|ec.portN|
|00000c70| 61 6d 65 20 3d 20 26 74 | 68 65 50 6f 72 74 53 65 |ame = &t|hePortSe|
|00000c80| 61 72 63 68 53 70 65 63 | 3b 0d 09 74 68 65 50 42 |archSpec|;..thePB|
|00000c90| 52 65 63 2e 6c 6f 63 61 | 74 69 6f 6e 4e 61 6d 65 |Rec.loca|tionName|
|00000ca0| 20 3d 20 74 68 65 4c 6f | 63 3b 0d 09 74 68 65 50 | = theLo|c;..theP|
|00000cb0| 42 52 65 63 2e 62 75 66 | 66 65 72 50 74 72 20 3d |BRec.buf|ferPtr =|
|00000cc0| 20 74 68 65 50 6f 72 74 | 3b 0d 0d 09 2f 2a 2a 0d | thePort|;.../**.|
|00000cd0| 09 20 2a 2a 20 43 61 6c | 6c 20 74 68 65 20 64 61 |. ** Cal|l the da|
|00000ce0| 6d 6d 20 72 6f 75 74 69 | 6e 65 20 61 6e 64 20 74 |mm routi|ne and t|
|00000cf0| 72 79 20 74 6f 20 67 65 | 74 20 74 68 65 20 73 74 |ry to ge|t the st|
|00000d00| 75 70 69 64 20 70 6f 72 | 74 20 62 61 63 6b 21 0d |upid por|t back!.|
|00000d10| 09 20 2a 2a 2f 0d 0d 09 | 74 68 65 45 72 72 20 3d |. **/...|theErr =|
|00000d20| 20 49 50 43 4c 69 73 74 | 50 6f 72 74 73 20 28 26 | IPCList|Ports (&|
|00000d30| 74 68 65 50 42 52 65 63 | 2c 20 66 61 6c 73 65 29 |thePBRec|, false)|
|00000d40| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 74 68 65 45 72 |;...retu|rn theEr|
|00000d50| 72 3b 0d 7d 0d 0d 2f 2a | 2a 0d 20 2a 20 4d 61 6b |r;.}../*|*. * Mak|
|00000d60| 65 50 61 73 63 61 6c 53 | 74 72 69 6e 67 57 4c 65 |ePascalS|tringWLe|
|00000d70| 6e 0d 20 2a 0d 20 2a 20 | 20 47 69 76 65 6e 20 61 |n. *. * | Given a|
|00000d80| 20 43 20 73 74 72 69 6e | 67 2c 20 70 75 74 20 69 | C strin|g, put i|
|00000d90| 74 20 69 6e 74 6f 20 61 | 20 70 61 73 63 61 6c 20 |t into a| pascal |
|00000da0| 73 74 6f 72 61 67 65 20 | 61 72 65 61 2e 20 20 57 |storage |area. W|
|00000db0| 65 20 61 6c 73 6f 20 6d | 61 6b 65 0d 20 2a 20 20 |e also m|ake. * |
|00000dc0| 73 75 72 65 20 74 68 61 | 74 20 74 68 65 20 6c 65 |sure tha|t the le|
|00000dd0| 6e 67 74 68 20 6f 66 20 | 74 68 65 20 70 61 73 63 |ngth of |the pasc|
|00000de0| 61 6c 20 73 74 72 69 6e | 67 20 69 73 6e 27 74 20 |al strin|g isn't |
|00000df0| 74 6f 6f 20 6c 6f 6e 67 | 20 28 74 68 65 20 63 61 |too long| (the ca|
|00000e00| 6c 6c 65 72 0d 20 2a 20 | 20 73 70 65 63 69 66 69 |ller. * | specifi|
|00000e10| 79 73 20 74 68 65 20 6c | 6f 6e 67 65 73 74 20 6c |ys the l|ongest l|
|00000e20| 65 6e 67 74 68 20 70 6f | 73 73 69 62 6c 65 29 2e |ength po|ssible).|
|00000e30| 20 20 57 65 20 61 72 65 | 20 70 61 73 73 65 64 20 | We are| passed |
|00000e40| 69 6e 20 74 68 65 20 6c | 65 6e 67 74 68 0d 20 2a |in the l|ength. *|
|00000e50| 20 20 6f 66 20 74 68 65 | 20 43 20 73 74 72 69 6e | of the| C strin|
|00000e60| 67 2e 2e 2e 20 54 68 69 | 73 20 6d 61 6b 65 73 20 |g... Thi|s makes |
|00000e70| 6f 75 72 20 6c 69 66 65 | 20 73 69 6d 70 6c 65 72 |our life| simpler|
|00000e80| 2e 2e 2e 0d 20 2a 0d 20 | 2a 2a 2f 0d 76 6f 69 64 |.... *. |**/.void|
|00000e90| 20 4d 61 6b 65 50 61 73 | 63 61 6c 53 74 72 69 6e | MakePas|calStrin|
|00000ea0| 67 57 4c 65 6e 20 28 53 | 74 72 69 6e 67 50 74 72 |gWLen (S|tringPtr|
|00000eb0| 20 74 68 65 44 65 73 74 | 2c 20 69 6e 74 20 74 68 | theDest|, int th|
|00000ec0| 65 44 65 73 74 4c 65 6e | 2c 20 63 68 61 72 20 2a |eDestLen|, char *|
|00000ed0| 74 68 65 53 72 63 2c 0d | 09 69 6e 74 20 74 68 65 |theSrc,.|.int the|
|00000ee0| 53 72 63 4c 65 6e 29 0d | 7b 0d 09 74 68 65 44 65 |SrcLen).|{..theDe|
|00000ef0| 73 74 5b 30 5d 20 3d 20 | 74 68 65 53 72 63 4c 65 |st[0] = |theSrcLe|
|00000f00| 6e 20 3e 20 74 68 65 44 | 65 73 74 4c 65 6e 20 3f |n > theD|estLen ?|
|00000f10| 20 74 68 65 44 65 73 74 | 4c 65 6e 20 3a 20 74 68 | theDest|Len : th|
|00000f20| 65 53 72 63 4c 65 6e 3b | 0d 09 42 6c 6f 63 6b 4d |eSrcLen;|..BlockM|
|00000f30| 6f 76 65 20 28 74 68 65 | 53 72 63 2c 20 26 28 74 |ove (the|Src, &(t|
|00000f40| 68 65 44 65 73 74 5b 31 | 5d 29 2c 20 74 68 65 44 |heDest[1|]), theD|
|00000f50| 65 73 74 5b 30 5d 29 3b | 0d 7d 0d 0d 2f 2a 2a 0d |est[0]);|.}../**.|
|00000f60| 20 2a 20 41 45 46 72 6f | 6d 48 43 50 72 6f 67 72 | * AEFro|mHCProgr|
|00000f70| 61 6d 0d 20 2a 0d 20 2a | 20 20 47 69 76 65 6e 20 |am. *. *| Given |
|00000f80| 61 20 48 43 20 70 72 6f | 67 72 61 6d 20 6e 61 6d |a HC pro|gram nam|
|00000f90| 65 2c 20 74 75 72 6e 20 | 69 74 20 69 6e 74 6f 20 |e, turn |it into |
|00000fa0| 61 6e 20 61 70 70 6c 65 | 20 65 76 65 6e 74 2e 20 |an apple| event. |
|00000fb0| 20 54 68 69 73 20 69 73 | 6e 27 74 0d 20 2a 20 20 | This is|n't. * |
|00000fc0| 74 6f 6f 20 62 61 64 3b | 20 77 65 20 6a 75 73 74 |too bad;| we just|
|00000fd0| 20 68 61 76 65 20 74 6f | 20 66 6f 6f 6c 20 61 20 | have to| fool a |
|00000fe0| 6c 69 74 74 6c 65 20 77 | 69 74 68 20 74 68 65 20 |little w|ith the |
|00000ff0| 64 65 73 63 72 69 70 74 | 6f 72 20 74 79 70 65 73 |descript|or types|
|00001000| 2e 0d 20 2a 20 20 43 6f | 64 65 20 74 68 61 6e 6b |.. * Co|de thank|
|00001010| 73 20 74 6f 20 4b 65 76 | 69 6e 20 61 74 20 41 70 |s to Kev|in at Ap|
|00001020| 70 6c 65 2e 0d 20 2a 2a | 2f 0d 23 64 65 66 69 6e |ple.. **|/.#defin|
|00001030| 65 20 6e 69 63 65 0d 4f | 53 45 72 72 20 41 45 46 |e nice.O|SErr AEF|
|00001040| 72 6f 6d 48 43 50 72 6f | 67 72 61 6d 20 28 53 74 |romHCPro|gram (St|
|00001050| 72 69 6e 67 50 74 72 20 | 74 68 65 48 43 50 72 6f |ringPtr |theHCPro|
|00001060| 67 4e 61 6d 65 2c 0d 09 | 41 45 45 76 65 6e 74 43 |gName,..|AEEventC|
|00001070| 6c 61 73 73 20 74 68 65 | 43 6c 61 73 73 2c 0d 09 |lass the|Class,..|
|00001080| 41 45 45 76 65 6e 74 49 | 44 20 74 68 65 45 76 65 |AEEventI|D theEve|
|00001090| 6e 74 49 44 2c 20 69 6e | 74 20 72 65 74 75 72 6e |ntID, in|t return|
|000010a0| 49 44 2c 20 6c 6f 6e 67 | 20 74 72 61 6e 73 61 63 |ID, long| transac|
|000010b0| 74 69 6f 6e 49 44 2c 0d | 09 41 70 70 6c 65 45 76 |tionID,.|.AppleEv|
|000010c0| 65 6e 74 20 2a 74 68 65 | 41 45 29 0d 7b 0d 23 69 |ent *the|AE).{.#i|
|000010d0| 66 64 65 66 20 6e 69 63 | 65 0d 09 41 45 44 65 73 |fdef nic|e..AEDes|
|000010e0| 63 09 74 68 65 41 64 64 | 72 65 73 73 44 65 73 63 |c.theAdd|ressDesc|
|000010f0| 3b 0d 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 |;..regis|ter int |
|00001100| 74 68 65 45 72 72 3b 0d | 0d 09 2f 2a 2a 0d 09 20 |theErr;.|../**.. |
|00001110| 2a 2a 20 43 6f 6e 76 65 | 72 74 20 74 68 65 20 73 |** Conve|rt the s|
|00001120| 74 72 69 6e 67 20 69 6e | 74 6f 20 61 20 64 65 73 |tring in|to a des|
|00001130| 63 72 69 70 74 6f 72 20 | 26 20 74 72 79 20 61 6e |criptor |& try an|
|00001140| 64 20 6d 61 6b 65 20 69 | 74 0d 09 20 2a 2a 20 69 |d make i|t.. ** i|
|00001150| 6e 74 6f 20 61 20 62 65 | 74 74 65 72 20 74 79 70 |nto a be|tter typ|
|00001160| 65 20 72 65 63 72 6f 64 | 2e 2e 2e 20 20 42 79 20 |e recrod|... By |
|00001170| 70 61 73 73 69 6e 67 20 | 27 41 44 44 52 27 20 61 |passing |'ADDR' a|
|00001180| 73 20 74 68 65 20 74 79 | 70 65 0d 09 20 2a 2a 20 |s the ty|pe.. ** |
|00001190| 69 6e 74 6f 20 77 68 69 | 63 68 20 77 65 20 77 69 |into whi|ch we wi|
|000011a0| 73 68 20 74 6f 20 63 6f | 6e 76 65 72 74 20 74 68 |sh to co|nvert th|
|000011b0| 65 20 64 61 72 6e 65 64 | 20 73 74 72 69 6e 67 2c |e darned| string,|
|000011c0| 20 77 65 20 6c 65 74 20 | 74 68 65 20 6d 61 63 0d | we let |the mac.|
|000011d0| 09 20 2a 2a 20 6f 73 20 | 28 50 50 43 20 54 6f 6f |. ** os |(PPC Too|
|000011e0| 6c 62 6f 78 29 20 64 65 | 63 69 64 65 20 69 66 20 |lbox) de|cide if |
|000011f0| 77 65 20 73 68 6f 75 6c | 64 20 64 6f 20 61 20 70 |we shoul|d do a p|
|00001200| 72 6f 63 65 73 73 20 73 | 65 72 69 61 6c 20 6e 75 |rocess s|erial nu|
|00001210| 6d 62 65 72 20 6f 72 0d | 09 20 2a 2a 20 61 20 72 |mber or.|. ** a r|
|00001220| 65 61 6c 20 74 61 72 67 | 65 74 49 44 20 72 65 63 |eal targ|etID rec|
|00001230| 6f 72 64 20 28 66 6f 72 | 20 6e 65 74 77 6f 72 6b |ord (for| network|
|00001240| 65 64 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 73 29 |ed desti|nations)|
|00001250| 2e 0d 09 20 2a 2a 2f 0d | 09 0d 09 74 68 65 45 72 |... **/.|...theEr|
|00001260| 72 20 3d 20 41 45 43 6f | 65 72 63 65 50 74 72 20 |r = AECo|ercePtr |
|00001270| 28 74 79 70 65 43 68 61 | 72 2c 20 28 50 74 72 29 |(typeCha|r, (Ptr)|
|00001280| 20 26 28 74 68 65 48 43 | 50 72 6f 67 4e 61 6d 65 | &(theHC|ProgName|
|00001290| 5b 31 5d 29 2c 0d 09 09 | 09 74 68 65 48 43 50 72 |[1]),...|.theHCPr|
|000012a0| 6f 67 4e 61 6d 65 5b 30 | 5d 2c 20 27 41 44 44 52 |ogName[0|], 'ADDR|
|000012b0| 27 2c 20 26 74 68 65 41 | 64 64 72 65 73 73 44 65 |', &theA|ddressDe|
|000012c0| 73 63 29 3b 0d 09 69 66 | 20 28 74 68 65 45 72 72 |sc);..if| (theErr|
|000012d0| 20 21 3d 20 6e 6f 45 72 | 72 29 0d 09 09 72 65 74 | != noEr|r)...ret|
|000012e0| 75 72 6e 20 74 68 65 45 | 72 72 3b 0d 0d 09 2f 2a |urn theE|rr;.../*|
|000012f0| 2a 0d 09 20 2a 2a 20 48 | 65 79 21 20 20 4e 65 78 |*.. ** H|ey! Nex|
|00001300| 74 20 6a 6f 62 3a 20 63 | 72 65 61 74 65 20 74 68 |t job: c|reate th|
|00001310| 65 20 61 70 70 6c 65 20 | 65 76 65 6e 74 2e 20 20 |e apple |event. |
|00001320| 50 72 65 74 74 79 20 65 | 61 73 79 2c 20 65 68 3f |Pretty e|asy, eh?|
|00001330| 0d 09 20 2a 2a 2f 0d 0d | 09 74 68 65 45 72 72 20 |.. **/..|.theErr |
|00001340| 3d 20 41 45 43 72 65 61 | 74 65 41 70 70 6c 65 45 |= AECrea|teAppleE|
|00001350| 76 65 6e 74 20 28 74 68 | 65 43 6c 61 73 73 2c 20 |vent (th|eClass, |
|00001360| 74 68 65 45 76 65 6e 74 | 49 44 2c 20 26 74 68 65 |theEvent|ID, &the|
|00001370| 41 64 64 72 65 73 73 44 | 65 73 63 2c 0d 09 09 72 |AddressD|esc,...r|
|00001380| 65 74 75 72 6e 49 44 2c | 20 74 72 61 6e 73 61 63 |eturnID,| transac|
|00001390| 74 69 6f 6e 49 44 2c 20 | 74 68 65 41 45 29 3b 0d |tionID, |theAE);.|
|000013a0| 0d 09 2f 2a 2a 0d 09 20 | 2a 2a 20 44 65 6c 65 74 |../**.. |** Delet|
|000013b0| 65 20 74 68 65 20 61 64 | 64 72 65 73 73 20 64 65 |e the ad|dress de|
|000013c0| 73 63 72 69 70 74 6f 72 | 20 61 6e 64 20 72 65 74 |scriptor| and ret|
|000013d0| 75 72 6e 2e 0d 09 20 2a | 2a 2f 0d 09 0d 09 72 65 |urn... *|*/....re|
|000013e0| 74 75 72 6e 20 74 68 65 | 45 72 72 3b 0d 23 65 6e |turn the|Err;.#en|
|000013f0| 64 69 66 0d 23 69 66 64 | 65 66 20 64 75 6d 79 5f |dif.#ifd|ef dumy_|
|00001400| 74 6f 6f 0d 09 72 65 67 | 69 73 74 65 72 20 69 6e |too..reg|ister in|
|00001410| 74 20 74 68 65 45 72 72 | 3b 0d 09 54 61 72 67 65 |t theErr|;..Targe|
|00001420| 74 49 44 20 74 68 65 54 | 61 72 67 65 74 3b 0d 09 |tID theT|arget;..|
|00001430| 50 6f 72 74 49 6e 66 6f | 52 65 63 20 74 68 65 50 |PortInfo|Rec theP|
|00001440| 6f 72 74 49 6e 66 6f 3b | 0d 09 63 68 61 72 20 73 |ortInfo;|..char s|
|00001450| 74 72 69 6e 67 5b 32 35 | 35 5d 3b 0d 09 41 45 41 |tring[25|5];..AEA|
|00001460| 64 64 72 65 73 73 44 65 | 73 63 20 74 61 72 67 65 |ddressDe|sc targe|
|00001470| 74 44 65 73 63 3b 0d 0d | 09 2f 2a 2a 0d 09 20 2a |tDesc;..|./**.. *|
|00001480| 2a 20 4f 6b 2e 2e 20 46 | 69 72 73 74 20 6a 6f 62 |* Ok.. F|irst job|
|00001490| 20 69 73 20 74 6f 20 63 | 6f 6e 76 65 72 74 20 74 | is to c|onvert t|
|000014a0| 68 65 20 74 68 69 6e 67 | 20 69 6e 74 6f 20 6c 6f |he thing| into lo|
|000014b0| 63 61 74 69 6f 6e 20 61 | 6e 64 20 70 6f 72 74 0d |cation a|nd port.|
|000014c0| 09 20 2a 2a 20 72 65 63 | 6f 72 64 73 2e 2e 2e 0d |. ** rec|ords....|
|000014d0| 09 20 2a 2a 2f 0d 09 0d | 09 42 6c 6f 63 6b 4d 6f |. **/...|.BlockMo|
|000014e0| 76 65 20 28 26 28 74 68 | 65 48 43 50 72 6f 67 4e |ve (&(th|eHCProgN|
|000014f0| 61 6d 65 5b 31 5d 29 2c | 20 73 74 72 69 6e 67 2c |ame[1]),| string,|
|00001500| 20 74 68 65 48 43 50 72 | 6f 67 4e 61 6d 65 5b 30 | theHCPr|ogName[0|
|00001510| 5d 29 3b 0d 09 73 74 72 | 69 6e 67 5b 74 68 65 48 |]);..str|ing[theH|
|00001520| 43 50 72 6f 67 4e 61 6d | 65 5b 30 5d 5d 20 3d 20 |CProgNam|e[0]] = |
|00001530| 30 3b 0d 09 0d 09 74 68 | 65 45 72 72 20 3d 20 48 |0;....th|eErr = H|
|00001540| 43 50 72 6f 67 72 61 6d | 54 6f 50 6f 72 74 41 6e |CProgram|ToPortAn|
|00001550| 64 4c 6f 63 20 28 73 74 | 72 69 6e 67 2c 20 26 28 |dLoc (st|ring, &(|
|00001560| 74 68 65 54 61 72 67 65 | 74 2e 6c 6f 63 61 74 69 |theTarge|t.locati|
|00001570| 6f 6e 29 2c 0d 09 09 09 | 20 26 74 68 65 50 6f 72 |on),....| &thePor|
|00001580| 74 49 6e 66 6f 29 3b 0d | 09 69 66 20 28 74 68 65 |tInfo);.|.if (the|
|00001590| 45 72 72 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |Err != n|oErr)...|
|000015a0| 72 65 74 75 72 6e 20 74 | 68 65 45 72 72 3b 0d 09 |return t|heErr;..|
|000015b0| 0d 09 2f 2a 2a 0d 09 20 | 2a 2a 20 4e 65 78 74 2c |../**.. |** Next,|
|000015c0| 20 70 75 74 20 74 68 65 | 20 6d 61 63 20 6e 61 6d | put the| mac nam|
|000015d0| 65 20 69 6e 74 6f 20 74 | 68 65 20 74 61 72 67 65 |e into t|he targe|
|000015e0| 74 20 67 75 79 2e 2e 2e | 0d 09 20 2a 2a 2f 0d 09 |t guy...|.. **/..|
|000015f0| 0d 09 74 68 65 54 61 72 | 67 65 74 2e 6e 61 6d 65 |..theTar|get.name|
|00001600| 20 3d 20 74 68 65 50 6f | 72 74 49 6e 66 6f 2e 6e | = thePo|rtInfo.n|
|00001610| 61 6d 65 3b 0d 09 0d 09 | 2f 2a 2a 0d 09 20 2a 2a |ame;....|/**.. **|
|00001620| 20 4e 65 78 74 2c 20 63 | 72 65 61 74 65 20 61 20 | Next, c|reate a |
|00001630| 64 65 73 63 72 69 70 74 | 6f 72 20 74 6f 20 68 6f |descript|or to ho|
|00001640| 6c 64 20 74 68 69 73 20 | 74 68 69 6e 67 2e 2e 2e |ld this |thing...|
|00001650| 0d 09 20 2a 2a 2f 0d 09 | 0d 09 74 68 65 45 72 72 |.. **/..|..theErr|
|00001660| 20 3d 20 41 45 43 72 65 | 61 74 65 44 65 73 63 20 | = AECre|ateDesc |
|00001670| 28 74 79 70 65 54 61 72 | 67 65 74 49 44 2c 20 28 |(typeTar|getID, (|
|00001680| 50 74 72 29 20 26 74 68 | 65 54 61 72 67 65 74 2c |Ptr) &th|eTarget,|
|00001690| 0d 09 09 73 69 7a 65 6f | 66 28 54 61 72 67 65 74 |...sizeo|f(Target|
|000016a0| 49 44 29 2c 20 26 74 61 | 72 67 65 74 44 65 73 63 |ID), &ta|rgetDesc|
|000016b0| 29 3b 0d 09 69 66 20 28 | 74 68 65 45 72 72 20 21 |);..if (|theErr !|
|000016c0| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 72 65 74 75 72 |= noErr)|...retur|
|000016d0| 6e 20 74 68 65 45 72 72 | 3b 0d 09 0d 09 2f 2a 2a |n theErr|;..../**|
|000016e0| 0d 09 20 2a 2a 20 52 69 | 67 68 74 20 6f 6e 2e 20 |.. ** Ri|ght on. |
|000016f0| 20 4e 6f 77 20 77 65 20 | 67 65 74 20 74 6f 20 63 | Now we |get to c|
|00001700| 72 65 61 74 65 20 74 68 | 65 20 61 70 70 6c 65 20 |reate th|e apple |
|00001710| 65 76 65 6e 74 2e 2e 2e | 0d 09 20 2a 2a 2f 0d 0d |event...|.. **/..|
|00001720| 09 74 68 65 45 72 72 20 | 3d 20 41 45 43 72 65 61 |.theErr |= AECrea|
|00001730| 74 65 41 70 70 6c 65 45 | 76 65 6e 74 20 28 74 68 |teAppleE|vent (th|
|00001740| 65 43 6c 61 73 73 2c 20 | 74 68 65 45 76 65 6e 74 |eClass, |theEvent|
|00001750| 49 44 2c 20 26 74 61 72 | 67 65 74 44 65 73 63 2c |ID, &tar|getDesc,|
|00001760| 0d 09 09 72 65 74 75 72 | 6e 49 44 2c 20 74 72 61 |...retur|nID, tra|
|00001770| 6e 73 61 63 74 69 6f 6e | 49 44 2c 20 74 68 65 41 |nsaction|ID, theA|
|00001780| 45 29 3b 0d 09 72 65 74 | 75 72 6e 20 74 68 65 45 |E);..ret|urn theE|
|00001790| 72 72 3b 0d 23 65 6e 64 | 69 66 0d 7d 0d 0d 2f 2a |rr;.#end|if.}../*|
|000017a0| 2a 0d 20 2a 20 6d 61 6b | 65 46 69 6c 65 4c 69 73 |*. * mak|eFileLis|
|000017b0| 74 46 6d 48 43 46 0d 20 | 2a 0d 20 2a 20 20 4d 61 |tFmHCF. |*. * Ma|
|000017c0| 6b 65 20 61 20 61 70 70 | 6c 65 20 65 76 65 6e 74 |ke a app|le event|
|000017d0| 20 66 69 6c 65 20 64 65 | 73 63 72 69 70 74 6f 72 | file de|scriptor|
|000017e0| 20 6c 69 73 74 20 66 72 | 6f 6d 20 61 20 68 79 70 | list fr|om a hyp|
|000017f0| 65 72 63 61 72 64 20 66 | 69 65 6c 64 2e 20 20 54 |ercard f|ield. T|
|00001800| 68 69 73 0d 20 2a 20 20 | 6d 65 61 6e 73 20 74 68 |his. * |means th|
|00001810| 61 74 20 77 65 20 65 78 | 70 65 63 74 20 61 6c 6c |at we ex|pect all|
|00001820| 20 74 68 65 20 66 69 65 | 6c 64 73 20 74 6f 20 62 | the fie|lds to b|
|00001830| 65 20 3c 72 65 74 75 72 | 6e 3e 20 73 65 70 65 72 |e <retur|n> seper|
|00001840| 61 74 65 64 20 28 77 65 | 0d 20 2a 20 20 75 73 65 |ated (we|. * use|
|00001850| 20 63 61 6c 6c 20 62 61 | 63 6b 20 72 6f 75 74 69 | call ba|ck routi|
|00001860| 6e 65 73 20 74 6f 20 66 | 69 67 75 72 65 20 6f 75 |nes to f|igure ou|
|00001870| 74 20 77 68 61 74 20 74 | 68 65 20 66 69 6c 65 20 |t what t|he file |
|00001880| 6e 61 6d 65 73 20 61 72 | 65 2e 2e 2e 29 2e 0d 20 |names ar|e...).. |
|00001890| 2a 0d 20 2a 2a 2f 0d 4f | 53 45 72 72 20 6d 61 6b |*. **/.O|SErr mak|
|000018a0| 65 46 69 6c 65 4c 69 73 | 74 46 6d 48 43 46 20 28 |eFileLis|tFmHCF (|
|000018b0| 58 43 6d 64 50 74 72 20 | 70 61 72 61 6d 50 74 72 |XCmdPtr |paramPtr|
|000018c0| 2c 20 63 68 61 72 20 2a | 63 66 69 6c 65 5f 6c 69 |, char *|cfile_li|
|000018d0| 73 74 2c 0d 09 09 41 45 | 44 65 73 63 4c 69 73 74 |st,...AE|DescList|
|000018e0| 20 2a 74 68 65 46 69 6c | 65 44 4c 29 0d 7b 0d 09 | *theFil|eDL).{..|
|000018f0| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 74 68 65 |register| int the|
|00001900| 45 72 72 2c 20 69 6e 64 | 65 78 3b 0d 09 63 68 61 |Err, ind|ex;..cha|
|00001910| 72 20 2a 6e 65 78 74 46 | 69 6c 65 3b 0d 09 53 74 |r *nextF|ile;..St|
|00001920| 72 32 35 35 20 61 46 69 | 6c 65 4e 61 6d 65 2c 20 |r255 aFi|leName, |
|00001930| 66 75 6c 6c 46 69 6c 65 | 4e 61 6d 65 3b 0d 09 53 |fullFile|Name;..S|
|00001940| 46 54 79 70 65 4c 69 73 | 74 20 74 68 65 54 79 70 |FTypeLis|t theTyp|
|00001950| 65 73 3b 0d 09 4f 53 54 | 79 70 65 20 74 68 65 46 |es;..OST|ype theF|
|00001960| 69 6c 65 54 79 70 65 3b | 0d 09 46 53 53 70 65 63 |ileType;|..FSSpec|
|00001970| 20 6d 79 46 53 3b 0d 09 | 41 6c 69 61 73 48 61 6e | myFS;..|AliasHan|
|00001980| 64 6c 65 20 6d 79 41 6c | 69 61 73 3b 0d 09 41 45 |dle myAl|ias;..AE|
|00001990| 44 65 73 63 20 74 68 65 | 41 6c 69 61 73 44 65 73 |Desc the|AliasDes|
|000019a0| 63 3b 0d 0d 09 2f 2a 2a | 0d 09 20 2a 2a 20 46 69 |c;.../**|.. ** Fi|
|000019b0| 72 73 74 2c 20 63 72 65 | 61 74 65 20 74 68 65 20 |rst, cre|ate the |
|000019c0| 64 65 73 63 72 69 70 74 | 6f 72 20 68 65 61 64 65 |descript|or heade|
|000019d0| 72 2e 2e 2e 0d 09 20 2a | 2a 2f 0d 09 0d 09 74 68 |r..... *|*/....th|
|000019e0| 65 45 72 72 20 3d 20 41 | 45 43 72 65 61 74 65 4c |eErr = A|ECreateL|
|000019f0| 69 73 74 20 28 30 4c 2c | 20 30 2c 20 66 61 6c 73 |ist (0L,| 0, fals|
|00001a00| 65 2c 20 74 68 65 46 69 | 6c 65 44 4c 29 3b 0d 09 |e, theFi|leDL);..|
|00001a10| 69 66 20 28 74 68 65 45 | 72 72 20 21 3d 20 6e 6f |if (theE|rr != no|
|00001a20| 45 72 72 29 0d 09 09 72 | 65 74 75 72 6e 20 74 68 |Err)...r|eturn th|
|00001a30| 65 45 72 72 3b 0d 09 0d | 09 2f 2a 2a 0d 09 20 2a |eErr;...|./**.. *|
|00001a40| 2a 20 4c 6f 6f 70 20 74 | 68 72 6f 75 67 68 20 61 |* Loop t|hrough a|
|00001a50| 6c 6c 20 72 65 74 75 72 | 6e 20 64 65 6c 69 6d 69 |ll retur|n delimi|
|00001a60| 74 65 64 20 66 69 6c 65 | 6e 61 6d 65 73 20 69 6e |ted file|names in|
|00001a70| 20 74 68 65 20 69 6e 70 | 75 74 20 73 74 72 69 6e | the inp|ut strin|
|00001a80| 67 2e 0d 09 20 2a 2a 20 | 46 6f 72 20 65 61 63 68 |g... ** |For each|
|00001a90| 20 6f 6e 65 2c 20 77 65 | 20 6d 75 73 74 20 63 6f | one, we| must co|
|00001aa0| 6e 76 65 72 74 20 69 74 | 20 74 6f 20 61 20 74 79 |nvert it| to a ty|
|00001ab0| 70 65 46 53 53 20 72 65 | 63 6f 72 64 20 61 6e 64 |peFSS re|cord and|
|00001ac0| 20 74 68 65 6e 0d 09 20 | 2a 2a 20 77 65 20 63 61 | then.. |** we ca|
|00001ad0| 6e 20 75 73 65 20 69 74 | 20 74 6f 20 63 6f 65 72 |n use it| to coer|
|00001ae0| 63 65 20 74 6f 20 61 20 | 74 79 70 65 41 6c 69 61 |ce to a |typeAlia|
|00001af0| 73 20 64 65 73 63 72 69 | 70 74 6f 72 20 77 68 69 |s descri|ptor whi|
|00001b00| 63 68 20 63 61 6e 0d 09 | 20 2a 2a 20 62 65 20 73 |ch can..| ** be s|
|00001b10| 65 6e 64 20 74 6f 20 74 | 68 65 20 6f 74 68 65 72 |end to t|he other|
|00001b20| 20 67 75 79 73 20 69 6e | 20 74 68 69 73 20 77 6f | guys in| this wo|
|00001b30| 72 6c 64 2e 2e 2e 0d 09 | 20 2a 2a 2f 0d 09 0d 09 |rld.....| **/....|
|00001b40| 6e 65 78 74 46 69 6c 65 | 20 3d 20 63 66 69 6c 65 |nextFile| = cfile|
|00001b50| 5f 6c 69 73 74 3b 0d 09 | 69 6e 64 65 78 20 3d 20 |_list;..|index = |
|00001b60| 30 3b 0d 0d 09 77 68 69 | 6c 65 20 28 2a 6e 65 78 |0;...whi|le (*nex|
|00001b70| 74 46 69 6c 65 20 21 3d | 20 27 5c 30 27 29 20 7b |tFile !=| '\0') {|
|00001b80| 0d 0d 09 09 52 65 74 75 | 72 6e 54 6f 50 61 73 20 |....Retu|rnToPas |
|00001b90| 28 70 61 72 61 6d 50 74 | 72 2c 20 6e 65 78 74 46 |(paramPt|r, nextF|
|00001ba0| 69 6c 65 2c 20 61 46 69 | 6c 65 4e 61 6d 65 29 3b |ile, aFi|leName);|
|00001bb0| 0d 09 09 53 63 61 6e 54 | 6f 52 65 74 75 72 6e 20 |...ScanT|oReturn |
|00001bc0| 28 70 61 72 61 6d 50 74 | 72 2c 20 26 6e 65 78 74 |(paramPt|r, &next|
|00001bd0| 46 69 6c 65 29 3b 0d 09 | 09 69 66 20 28 2a 6e 65 |File);..|.if (*ne|
|00001be0| 78 74 46 69 6c 65 20 21 | 3d 20 30 29 20 6e 65 78 |xtFile !|= 0) nex|
|00001bf0| 74 46 69 6c 65 2b 2b 3b | 0d 0d 09 09 74 68 65 46 |tFile++;|....theF|
|00001c00| 69 6c 65 54 79 70 65 20 | 3d 20 27 20 20 20 20 27 |ileType |= ' '|
|00001c10| 3b 0d 0d 09 09 2f 2a 2a | 0d 09 09 20 2a 2a 20 54 |;..../**|... ** T|
|00001c20| 72 79 20 74 6f 20 6d 61 | 6b 65 20 74 68 65 20 46 |ry to ma|ke the F|
|00001c30| 53 53 70 65 63 20 66 72 | 6f 6d 20 74 68 65 20 66 |SSpec fr|om the f|
|00001c40| 69 6c 65 2e 20 20 49 66 | 20 77 65 20 66 61 69 6c |ile. If| we fail|
|00001c50| 2c 20 74 68 65 6e 0d 09 | 09 20 2a 2a 20 61 73 6b |, then..|. ** ask|
|00001c60| 20 74 68 65 20 75 73 65 | 72 20 74 6f 20 70 6f 69 | the use|r to poi|
|00001c70| 6e 74 20 6f 75 74 20 74 | 68 65 20 66 69 6c 65 20 |nt out t|he file |
|00001c80| 74 6f 20 75 73 2e 0d 09 | 09 20 2a 2a 2f 0d 0d 09 |to us...|. **/...|
|00001c90| 09 74 68 65 45 72 72 20 | 3d 20 46 53 4d 61 6b 65 |.theErr |= FSMake|
|00001ca0| 46 53 53 70 65 63 20 28 | 30 2c 20 30 2c 20 61 46 |FSSpec (|0, 0, aF|
|00001cb0| 69 6c 65 4e 61 6d 65 2c | 20 26 6d 79 46 53 29 3b |ileName,| &myFS);|
|00001cc0| 0d 09 09 7b 0d 09 09 09 | 53 74 72 32 35 35 20 74 |...{....|Str255 t|
|00001cd0| 68 65 4e 75 6d 3b 0d 09 | 09 09 0d 09 09 09 4e 75 |heNum;..|......Nu|
|00001ce0| 6d 54 6f 53 74 72 20 28 | 70 61 72 61 6d 50 74 72 |mToStr (|paramPtr|
|00001cf0| 2c 20 74 68 65 45 72 72 | 2c 20 74 68 65 4e 75 6d |, theErr|, theNum|
|00001d00| 29 3b 0d 09 09 09 53 65 | 74 47 6c 6f 62 61 6c 20 |);....Se|tGlobal |
|00001d10| 28 70 61 72 61 6d 50 74 | 72 2c 20 28 53 74 72 69 |(paramPt|r, (Stri|
|00001d20| 6e 67 50 74 72 29 20 22 | 5c 70 74 68 65 45 72 72 |ngPtr) "|\ptheErr|
|00001d30| 46 53 22 2c 0d 09 09 09 | 09 50 61 73 54 6f 5a 65 |FS",....|.PasToZe|
|00001d40| 72 6f 20 28 70 61 72 61 | 6d 50 74 72 2c 20 74 68 |ro (para|mPtr, th|
|00001d50| 65 4e 75 6d 29 29 3b 0d | 09 09 7d 0d 0d 09 09 69 |eNum));.|..}....i|
|00001d60| 66 20 28 74 68 65 45 72 | 72 20 21 3d 20 6e 6f 45 |f (theEr|r != noE|
|00001d70| 72 72 29 20 7b 0d 09 09 | 09 69 66 20 28 47 65 74 |rr) {...|.if (Get|
|00001d80| 46 69 6c 65 50 61 74 68 | 28 70 61 72 61 6d 50 74 |FilePath|(paramPt|
|00001d90| 72 2c 20 28 53 74 72 69 | 6e 67 50 74 72 29 20 61 |r, (Stri|ngPtr) a|
|00001da0| 46 69 6c 65 4e 61 6d 65 | 2c 20 30 2c 20 74 68 65 |FileName|, 0, the|
|00001db0| 54 79 70 65 73 2c 0d 09 | 09 09 09 09 09 20 74 72 |Types,..|..... tr|
|00001dc0| 75 65 2c 20 26 74 68 65 | 46 69 6c 65 54 79 70 65 |ue, &the|FileType|
|00001dd0| 2c 20 28 53 74 72 69 6e | 67 50 74 72 29 20 66 75 |, (Strin|gPtr) fu|
|00001de0| 6c 6c 46 69 6c 65 4e 61 | 6d 65 29 29 0d 09 09 09 |llFileNa|me))....|
|00001df0| 09 74 68 65 45 72 72 20 | 3d 20 46 53 4d 61 6b 65 |.theErr |= FSMake|
|00001e00| 46 53 53 70 65 63 20 28 | 30 2c 20 30 2c 20 66 75 |FSSpec (|0, 0, fu|
|00001e10| 6c 6c 46 69 6c 65 4e 61 | 6d 65 2c 20 26 6d 79 46 |llFileNa|me, &myF|
|00001e20| 53 29 3b 0d 09 09 7d 0d | 09 09 69 66 20 28 74 68 |S);...}.|..if (th|
|00001e30| 65 45 72 72 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |eErr != |noErr)..|
|00001e40| 09 09 72 65 74 75 72 6e | 20 74 68 65 45 72 72 3b |..return| theErr;|
|00001e50| 0d 0d 09 09 69 6e 64 65 | 78 2b 2b 3b 0d 0d 09 09 |....inde|x++;....|
|00001e60| 2f 2a 2a 0d 09 09 20 2a | 2a 20 4e 65 78 74 2c 20 |/**... *|* Next, |
|00001e70| 63 72 65 61 74 65 20 61 | 6e 20 61 6c 69 61 73 20 |create a|n alias |
|00001e80| 74 79 70 65 20 6f 20 72 | 65 63 6f 72 64 2e 2e 2e |type o r|ecord...|
|00001e90| 0d 09 09 20 2a 2a 2f 0d | 09 09 0d 09 09 74 68 65 |... **/.|.....the|
|00001ea0| 45 72 72 20 3d 20 4e 65 | 77 41 6c 69 61 73 20 28 |Err = Ne|wAlias (|
|00001eb0| 30 4c 2c 20 26 6d 79 46 | 53 2c 20 26 6d 79 41 6c |0L, &myF|S, &myAl|
|00001ec0| 69 61 73 29 3b 0d 09 09 | 69 66 20 28 74 68 65 45 |ias);...|if (theE|
|00001ed0| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |rr != no|Err)....|
|00001ee0| 72 65 74 75 72 6e 20 74 | 68 65 45 72 72 3b 0d 09 |return t|heErr;..|
|00001ef0| 09 0d 09 09 2f 2a 2a 0d | 09 09 20 2a 2a 20 41 6e |..../**.|.. ** An|
|00001f00| 64 20 61 64 64 20 69 74 | 20 74 6f 20 74 68 65 20 |d add it| to the |
|00001f10| 6c 69 73 74 2e 2e 2e 0d | 09 09 20 2a 2a 2f 0d 0d |list....|.. **/..|
|00001f20| 09 09 74 68 65 45 72 72 | 20 3d 20 41 45 50 75 74 |..theErr| = AEPut|
|00001f30| 50 74 72 20 28 74 68 65 | 46 69 6c 65 44 4c 2c 20 |Ptr (the|FileDL, |
|00001f40| 69 6e 64 65 78 2c 20 74 | 79 70 65 41 6c 69 61 73 |index, t|ypeAlias|
|00001f50| 2c 20 28 50 74 72 29 20 | 2a 6d 79 41 6c 69 61 73 |, (Ptr) |*myAlias|
|00001f60| 2c 0d 09 09 09 09 47 65 | 74 48 61 6e 64 6c 65 53 |,.....Ge|tHandleS|
|00001f70| 69 7a 65 20 28 28 48 61 | 6e 64 6c 65 29 20 6d 79 |ize ((Ha|ndle) my|
|00001f80| 41 6c 69 61 73 29 29 3b | 0d 09 09 69 66 20 28 74 |Alias));|...if (t|
|00001f90| 68 65 45 72 72 20 21 3d | 20 6e 6f 45 72 72 29 0d |heErr !=| noErr).|
|00001fa0| 09 09 09 72 65 74 75 72 | 6e 20 74 68 65 45 72 72 |...retur|n theErr|
|00001fb0| 3b 0d 09 09 0d 09 09 7b | 0d 09 09 09 41 45 44 65 |;......{|....AEDe|
|00001fc0| 73 63 20 74 68 65 4a 75 | 6e 6b 3b 0d 09 09 09 53 |sc theJu|nk;....S|
|00001fd0| 74 72 32 35 35 20 73 74 | 72 69 6e 67 3b 0d 09 09 |tr255 st|ring;...|
|00001fe0| 09 50 72 6f 63 50 74 72 | 20 70 72 6f 63 2c 20 70 |.ProcPtr| proc, p|
|00001ff0| 72 6f 63 31 3b 0d 09 09 | 09 6c 6f 6e 67 20 72 65 |roc1;...|.long re|
|00002000| 66 63 6f 6e 3b 0d 09 09 | 09 42 6f 6f 6c 65 61 6e |fcon;...|.Boolean|
|00002010| 20 69 73 64 65 73 63 3b | 0d 09 09 09 0d 2f 2a 09 | isdesc;|...../*.|
|00002020| 09 09 74 68 65 45 72 72 | 20 3d 20 41 45 43 72 65 |..theErr| = AECre|
|00002030| 61 74 65 44 65 73 63 20 | 28 74 79 70 65 46 53 53 |ateDesc |(typeFSS|
|00002040| 2c 20 28 50 74 72 29 20 | 26 6d 79 46 53 2c 20 73 |, (Ptr) |&myFS, s|
|00002050| 69 7a 65 6f 66 20 28 46 | 53 53 70 65 63 29 2c 0d |izeof (F|SSpec),.|
|00002060| 09 09 09 09 26 74 68 65 | 4a 75 6e 6b 29 3b 0d 2a |....&the|Junk);.*|
|00002070| 2f 09 09 09 0d 09 09 09 | 74 68 65 45 72 72 20 3d |/.......|theErr =|
|00002080| 20 41 45 43 6f 65 72 63 | 65 50 74 72 20 28 74 79 | AECoerc|ePtr (ty|
|00002090| 70 65 46 53 53 2c 20 28 | 50 74 72 29 20 26 6d 79 |peFSS, (|Ptr) &my|
|000020a0| 46 53 2c 20 73 69 7a 65 | 6f 66 28 46 53 53 70 65 |FS, size|of(FSSpe|
|000020b0| 63 29 2c 0d 09 09 09 09 | 74 79 70 65 41 6c 69 61 |c),.....|typeAlia|
|000020c0| 73 2c 20 26 74 68 65 4a | 75 6e 6b 29 3b 0d 09 09 |s, &theJ|unk);...|
|000020d0| 09 4e 75 6d 54 6f 53 74 | 72 20 28 70 61 72 61 6d |.NumToSt|r (param|
|000020e0| 50 74 72 2c 20 74 68 65 | 45 72 72 2c 20 73 74 72 |Ptr, the|Err, str|
|000020f0| 69 6e 67 29 3b 0d 09 09 | 09 53 65 74 47 6c 6f 62 |ing);...|.SetGlob|
|00002100| 61 6c 20 28 70 61 72 61 | 6d 50 74 72 2c 20 28 53 |al (para|mPtr, (S|
|00002110| 74 72 69 6e 67 50 74 72 | 29 20 22 5c 70 74 68 65 |tringPtr|) "\pthe|
|00002120| 45 72 72 43 22 2c 0d 09 | 09 09 09 50 61 73 54 6f |ErrC",..|...PasTo|
|00002130| 5a 65 72 6f 20 28 70 61 | 72 61 6d 50 74 72 2c 20 |Zero (pa|ramPtr, |
|00002140| 73 74 72 69 6e 67 29 29 | 3b 0d 09 09 09 70 72 6f |string))|;....pro|
|00002150| 63 20 3d 20 30 3b 0d 09 | 09 09 74 68 65 45 72 72 |c = 0;..|..theErr|
|00002160| 20 3d 20 41 45 47 65 74 | 43 6f 65 72 63 69 6f 6e | = AEGet|Coercion|
|00002170| 48 61 6e 64 6c 65 72 20 | 28 74 79 70 65 46 53 53 |Handler |(typeFSS|
|00002180| 2c 20 74 79 70 65 41 6c | 69 61 73 2c 0d 09 09 09 |, typeAl|ias,....|
|00002190| 09 26 70 72 6f 63 2c 20 | 26 72 65 66 63 6f 6e 2c |.&proc, |&refcon,|
|000021a0| 20 26 69 73 64 65 73 63 | 2c 20 66 61 6c 73 65 29 | &isdesc|, false)|
|000021b0| 3b 0d 09 09 09 70 72 6f | 63 31 20 3d 20 30 3b 0d |;....pro|c1 = 0;.|
|000021c0| 09 09 09 74 68 65 45 72 | 72 20 3d 20 41 45 47 65 |...theEr|r = AEGe|
|000021d0| 74 43 6f 65 72 63 69 6f | 6e 48 61 6e 64 6c 65 72 |tCoercio|nHandler|
|000021e0| 20 28 74 79 70 65 41 6c | 69 61 73 2c 20 74 79 70 | (typeAl|ias, typ|
|000021f0| 65 46 53 53 2c 0d 09 09 | 09 09 26 70 72 6f 63 31 |eFSS,...|..&proc1|
|00002200| 2c 20 26 72 65 66 63 6f | 6e 2c 20 26 69 73 64 65 |, &refco|n, &isde|
|00002210| 73 63 2c 20 74 72 75 65 | 29 3b 0d 09 09 09 42 6f |sc, true|);....Bo|
|00002220| 6f 6c 54 6f 53 74 72 20 | 28 70 61 72 61 6d 50 74 |olToStr |(paramPt|
|00002230| 72 2c 20 28 28 70 72 6f | 63 31 20 21 3d 20 30 29 |r, ((pro|c1 != 0)|
|00002240| 20 7c 7c 20 28 70 72 6f | 63 20 21 3d 20 30 29 29 | || (pro|c != 0))|
|00002250| 2c 20 73 74 72 69 6e 67 | 29 3b 0d 09 09 09 53 65 |, string|);....Se|
|00002260| 74 47 6c 6f 62 61 6c 20 | 28 70 61 72 61 6d 50 74 |tGlobal |(paramPt|
|00002270| 72 2c 20 28 53 74 72 69 | 6e 67 50 74 72 29 20 22 |r, (Stri|ngPtr) "|
|00002280| 5c 70 68 61 6e 64 6c 65 | 72 49 73 22 2c 0d 09 09 |\phandle|rIs",...|
|00002290| 09 09 50 61 73 54 6f 5a | 65 72 6f 20 28 70 61 72 |..PasToZ|ero (par|
|000022a0| 61 6d 50 74 72 2c 20 73 | 74 72 69 6e 67 29 29 3b |amPtr, s|tring));|
|000022b0| 0d 09 09 7d 0d 09 7d 0d | 0d 09 2f 2a 2a 0d 09 20 |...}..}.|../**.. |
|000022c0| 2a 2a 20 53 6f 6d 65 20 | 62 61 73 69 63 20 65 72 |** Some |basic er|
|000022d0| 72 6f 72 20 63 68 65 63 | 6b 69 6e 67 20 2d 2d 20 |ror chec|king -- |
|000022e0| 6d 61 6b 65 20 73 75 72 | 65 20 77 65 20 73 65 6e |make sur|e we sen|
|000022f0| 74 20 73 6f 6d 65 74 68 | 69 6e 67 2e 2e 2e 0d 09 |t someth|ing.....|
|00002300| 20 2a 2a 2f 0d 0d 09 69 | 66 20 28 69 6e 64 65 78 | **/...i|f (index|
|00002310| 29 20 7b 0d 09 09 72 65 | 74 75 72 6e 20 6e 6f 45 |) {...re|turn noE|
|00002320| 72 72 3b 0d 09 7d 20 65 | 6c 73 65 20 7b 0d 09 09 |rr;..} e|lse {...|
|00002330| 72 65 74 75 72 6e 20 31 | 3b 0d 09 7d 0d 7d 0d 00 |return 1|;..}.}..|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00002390| 7a 5f 29 01 15 b2 34 01 | 00 6c 33 02 26 6d f6 2a |z_)...4.|.l3.&m.*|
|000023a0| 51 01 1e 28 b1 45 01 67 | 12 4a 32 01 00 78 33 6d |Q..(.E.g|.J2..x3m|
|000023b0| 0b 68 79 70 65 72 55 74 | 69 6c 2e 63 02 00 00 00 |.hyperUt|il.c....|
|000023c0| 50 61 72 74 53 49 54 78 | 00 00 00 00 00 00 00 00 |PartSITx|........|
|000023d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 a9 81 49 4c 00 00 | 00 00 00 00 01 ac 30 02 |....IL..|......0.|
|00002400| e3 88 22 2e 5f 04 74 30 | 92 82 b2 80 5e c0 13 02 |.."._.t0|....^...|
|00002410| 40 00 01 48 c0 84 d6 05 | 3c 2d f9 e8 e2 46 47 ed |@..H....|<-...FG.|
|00002420| f9 e8 f7 04 3c 2d f9 e6 | 47 ed f9 e6 35 78 01 e7 |....<-..|G...5x..|
|00002430| 80 f1 01 50 87 35 01 c1 | fc 75 07 2a 00 70 2e da |...P.5..|.u.*.p..|
|00002440| 80 4a 04 67 1a 3c 2d f9 | e8 7d 01 c0 46 8b 02 32 |.J.g.<-.|.}..F..2|
|00002450| 00 4a 81 df b7 5f 01 e2 | 80 78 03 de 80 30 13 52 |.J..._..|.x...0.R|
|00002460| 53 bd 4d 02 6d 02 42 53 | 29 04 08 72 28 00 38 85 |S.M.m.BS|)..r(.8.|
|00002470| 39 47 69 03 30 05 d0 44 | 39 40 5e 7c 93 02 d0 47 |9Gi.0..D|9@^|...G|
|00002480| 00 00 00 48 00 09 50 72 | 6f 46 6f 6e 74 00 01 df |...H..Pr|oFont...|
|00002490| 00 1c 02 3f 7f ff 7f ff | 00 00 00 00 00 00 00 00 |...?....|........|
|000024a0| 00 00 00 74 00 01 00 06 | 00 04 00 64 00 1c 01 dd |...t....|...d....|
|000024b0| 02 3d 00 64 00 1c 01 dd | 02 3d a4 cb 45 1c 00 00 |.=.d....|.=..E...|
|000024c0| 00 00 00 00 00 00 00 00 | 21 0d 01 00 00 00 00 1e |........|!.......|
|000024d0| 00 64 00 1c 01 dd 02 3d | 00 64 00 1c 01 dd 02 3d |.d.....=|.d.....=|
|000024e0| 00 00 21 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |..!.....|........|
|000024f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 4f |.....n..|.n...>.O|
|00002500| 78 18 11 a2 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |x.......|.>..MPSR|
|00002510| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 03 f0 ff ff 00 00 00 4c | 00 51 69 cc 00 00 00 00 |.......L|.Qi.....|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+